package com.twu.biblioteca.app;

import com.twu.biblioteca.app.book.CheckoutDetails;
import com.twu.biblioteca.app.book.CheckoutStatus;
import com.twu.biblioteca.app.user.User;

public class Item {
    private CheckoutDetails checkoutDetails;
    private String title;

    public Item(String title){
        this.title = title;
        this.checkoutDetails = new CheckoutDetails();
    }

    public Item(String title, CheckoutDetails checkoutDetails) {
        this.title = title;
        this.checkoutDetails = checkoutDetails;
    }

    public CheckoutDetails getCheckoutDetails() { return this.checkoutDetails; }

    public void setCheckoutDetails(CheckoutStatus checkoutStatus, User checkedOutBy) {
        this.checkoutDetails.setCheckoutStatus(checkoutStatus);
        this.checkoutDetails.setCheckedOutBy(checkedOutBy);
    }

    public String getTitle() {
        return this.title;
    }
}
